home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / 204inc_h.lzh / exec / execbase.h < prev    next >
C/C++ Source or Header  |  1991-03-14  |  6KB  |  186 lines

  1. #ifndef EXEC_EXECBASE_H
  2. #define EXEC_EXECBASE_H
  3. /*
  4. **    $Filename: exec/execbase.h $
  5. **    $Release: 2.04 $
  6. **    $Revision: 36.14 $
  7. **    $Date: 91/02/19 $
  8. **
  9. **    Definition of the exec.library base structure.
  10. **
  11. **    (C) Copyright 1985,1986,1987,1988,1989 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14.  
  15. #ifndef EXEC_LISTS_H
  16. #include "exec/lists.h"
  17. #endif /* EXEC_LISTS_H */
  18.  
  19. #ifndef EXEC_INTERRUPTS_H
  20. #include "exec/interrupts.h"
  21. #endif /* EXEC_INTERRUPTS_H */
  22.  
  23. #ifndef EXEC_LIBRARIES_H
  24. #include "exec/libraries.h"
  25. #endif /* EXEC_LIBRARIES_H */
  26.  
  27. #ifndef EXEC_TASKS_H
  28. #include "exec/tasks.h"
  29. #endif /* EXEC_TASKS_H */
  30.  
  31.  
  32. /* Definition of the Exec library base structure (pointed to by location 4).
  33. ** Most fields are not to be viewed or modified by user programs.  Use
  34. ** extreme caution.
  35. */
  36. struct ExecBase {
  37.     struct Library LibNode; /* Standard library node */
  38.  
  39. /******** Static System Variables ********/
  40.  
  41.     UWORD    SoftVer;    /* kickstart release number (obs.) */
  42.     WORD    LowMemChkSum;    /* checksum of 68000 trap vectors */
  43.     ULONG    ChkBase;    /* system base pointer complement */
  44.     APTR    ColdCapture;    /* coldstart soft capture vector */
  45.     APTR    CoolCapture;    /* coolstart soft capture vector */
  46.     APTR    WarmCapture;    /* warmstart soft capture vector */
  47.     APTR    SysStkUpper;    /* system stack base   (upper bound) */
  48.     APTR    SysStkLower;    /* top of system stack (lower bound) */
  49.     ULONG    MaxLocMem;    /* top of chip memory */
  50.     APTR    DebugEntry;    /* global debugger entry point */
  51.     APTR    DebugData;    /* global debugger data segment */
  52.     APTR    AlertData;    /* alert data segment */
  53.     APTR    MaxExtMem;    /* top of extended mem, or null if none */
  54.  
  55.     UWORD    ChkSum;    /* for all of the above (minus 2) */
  56.  
  57. /****** Interrupt Related ***************************************/
  58.  
  59.     struct    IntVector IntVects[16];
  60.  
  61. /****** Dynamic System Variables *************************************/
  62.  
  63.     struct    Task *ThisTask; /* pointer to current task (readable) */
  64.  
  65.     ULONG    IdleCount;    /* idle counter */
  66.     ULONG    DispCount;    /* dispatch counter */
  67.     UWORD    Quantum;    /* time slice quantum */
  68.     UWORD    Elapsed;    /* current quantum ticks */
  69.     UWORD    SysFlags;    /* misc internal system flags */
  70.     BYTE    IDNestCnt;    /* interrupt disable nesting count */
  71.     BYTE    TDNestCnt;    /* task disable nesting count */
  72.  
  73.     UWORD    AttnFlags;    /* special attention flags (readable) */
  74.  
  75.     UWORD    AttnResched;    /* rescheduling attention */
  76.     APTR    ResModules;    /* resident module array pointer */
  77.     APTR    TaskTrapCode;
  78.     APTR    TaskExceptCode;
  79.     APTR    TaskExitCode;
  80.     ULONG    TaskSigAlloc;
  81.     UWORD    TaskTrapAlloc;
  82.  
  83.  
  84. /****** System Lists (private!) ********************************/
  85.  
  86.     struct    List MemList;
  87.     struct    List ResourceList;
  88.     struct    List DeviceList;
  89.     struct    List IntrList;
  90.     struct    List LibList;
  91.     struct    List PortList;
  92.     struct    List TaskReady;
  93.     struct    List TaskWait;
  94.  
  95.     struct    SoftIntList SoftInts[5];
  96.  
  97. /****** Other Globals *******************************************/
  98.  
  99.     LONG    LastAlert[4];
  100.  
  101.     /* these next two variables are provided to allow
  102.     ** system developers to have a rough idea of the
  103.     ** period of two externally controlled signals --
  104.     ** the time between vertical blank interrupts and the
  105.     ** external line rate (which is counted by CIA A's
  106.     ** "time of day" clock).  In general these values
  107.     ** will be 50 or 60, and may or may not track each
  108.     ** other.  These values replace the obsolete AFB_PAL
  109.     ** and AFB_50HZ flags.
  110.     */
  111.     UBYTE    VBlankFrequency;    /* (readable) */
  112.     UBYTE    PowerSupplyFrequency;    /* (readable) */
  113.  
  114.     struct    List SemaphoreList;
  115.  
  116.     /* these next two are to be able to kickstart into user ram.
  117.     ** KickMemPtr holds a singly linked list of MemLists which
  118.     ** will be removed from the memory list via AllocAbs.  If
  119.     ** all the AllocAbs's succeeded, then the KickTagPtr will
  120.     ** be added to the rom tag list.
  121.     */
  122.     APTR    KickMemPtr;    /* ptr to queue of mem lists */
  123.     APTR    KickTagPtr;    /* ptr to rom tag queue */
  124.     APTR    KickCheckSum;    /* checksum for mem and tags */
  125.  
  126. /****** V36 Exec additions start here **************************************/
  127.  
  128.     UWORD    ex_Pad0;
  129.     ULONG    ex_Reserved0;
  130.     APTR    ex_RamLibPrivate;
  131.     /* The next ULONG contains the system "E" clock frequency,
  132.     ** expressed in Hertz.    The E clock is used as a timebase for
  133.     ** the Amiga's 8520 I/O chips. (E is connected to "02").
  134.     ** Typical values are 715909 for NTSC, or 709379 for PAL.
  135.     */
  136.     ULONG    ex_EClockFrequency;    /* (readable) */
  137.     ULONG    ex_CacheControl;    /* Private to CacheControl calls */
  138.     ULONG    ex_TaskID;        /* Next available task ID */
  139.  
  140.     ULONG    ex_PuddleSize;
  141.     ULONG    ex_PoolThreshold;
  142.     struct    MinList ex_PublicPool;
  143.  
  144.     APTR    ex_MMULock;        /* private */
  145.  
  146.     UBYTE    ex_Reserved[12];
  147. };
  148.  
  149.  
  150. /****** Bit defines for AttnFlags (see above) ******************************/
  151.  
  152. /*  Processors and Co-processors: */
  153. #define AFB_68010    0    /* also set for 68020 */
  154. #define AFB_68020    1    /* also set for 68030 */
  155. #define AFB_68030    2    /* also set for 68040 */
  156. #define AFB_68040    3
  157. #define AFB_68881    4    /* also set for 68882 */
  158. #define AFB_68882    5
  159.  
  160. #define AFF_68010    (1L<<0)
  161. #define AFF_68020    (1L<<1)
  162. #define AFF_68030    (1L<<2)
  163. #define AFF_68040    (1L<<3)
  164. #define AFF_68881    (1L<<4)
  165. #define AFF_68882    (1L<<5)
  166.  
  167. /* #define AFB_RESERVED8   8 */
  168. /* #define AFB_RESERVED9   9 */
  169.  
  170.  
  171. /****** Selected flag definitions for Cache manipulation calls **********/
  172.  
  173. #define CACRF_EnableI        (1L<<0)  /* Enable instruction cache */
  174. #define CACRF_FreezeI        (1L<<1)  /* Freeze instruction cache */
  175. #define CACRF_ClearI        (1L<<3)  /* Clear instruction cache  */
  176. #define CACRF_IBE        (1L<<4)  /* Instruction burst enable */
  177. #define CACRF_EnableD        (1L<<8)  /* 68030 Enable data cache  */
  178. #define CACRF_FreezeD        (1L<<9)  /* 68030 Freeze data cache  */
  179. #define CACRF_ClearD        (1L<<11) /* 68030 Clear data cache     */
  180. #define CACRF_DBE        (1L<<12) /* 68030 Data burst enable */
  181. #define CACRF_WriteAllocate (1L<<13) /* 68030 Write-Allocate mode
  182.                     (must always be set!)     */
  183. #define CACRF_CopyBack        (1L<<31) /* Master enable for copyback caches */
  184.  
  185. #endif    /* EXEC_EXECBASE_H */
  186.